package com.qf.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 千锋健哥
 */
@RestController
@RequestMapping("/test")
//动态刷新
@RefreshScope
public class TestController {

    //获取码云配置中心当中的信息
    @Value("${version}")
    private String version;

    @RequestMapping("/t1")
    public String hello() {
        return version;
    }
}
